home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 80 / CD Actual 80 Julio-Agosto 2003.iso / Linux / LinuxGazette / lg / issue17 / source / wireframe2.rib < prev    next >
Encoding:
Text File  |  2002-08-14  |  2.1 KB  |  88 lines

  1. #########################################
  2. # Test RIB for checking shaders
  3. # By Michael J. Hammel March 1997
  4. #########################################
  5.  
  6. # First we setup the output file 
  7. Display "wireframe2.tif" "file" "rgb"
  8.  
  9. # Then set the x & y resolution of the image and the pixel aspect
  10. # ratio (1 = square pixels)
  11. Format 320 240 1
  12.  
  13. # We now setup the camera (projection type and field of view)
  14. Projection "perspective" "fov" 35
  15.  
  16. # Move the world 16 units away from the camera and position it
  17. # so the view is to the left of the camera and down from the cameras
  18. # point of view.
  19. Translate 0 0 16 
  20.  
  21. #
  22. # Off-white ambient light, not very intense, to make sure everything 
  23. # gets lit just a little.
  24. #
  25. LightSource "ambientlight" 1 
  26.          "intensity" 0.03 "lightcolor" [0.7 0.7 0.7]
  27.  
  28. TransformBegin
  29.  
  30. # Our first (and only) frame....
  31. FrameBegin 1
  32.  
  33. WorldBegin
  34.  
  35.    #
  36.    # Distant lights directly in front of and just off to both sides of
  37.    # our cylinder.
  38.    #
  39.    TransformBegin
  40.       Rotate -25 0 1 0
  41.       LightSource "distantlight" 3 
  42.          "intensity" 0.825 "lightcolor" [1 1 1]
  43.    TransformEnd
  44.    TransformBegin
  45.       Rotate 25 0 1 0
  46.       LightSource "distantlight" 3 
  47.          "intensity" 0.625 "lightcolor" [1 1 1]
  48.    TransformEnd
  49.    TransformBegin
  50.       LightSource "distantlight" 3 
  51.          "intensity" 0.425 "lightcolor" [1 1 1]
  52.    TransformEnd
  53.  
  54.    # The plane with a crossed tile pattern - used as a backdrop
  55.    TransformBegin
  56.       Translate -.6 -.5 0
  57.       Scale 2.5 2.5 1
  58.       AttributeBegin
  59.          Color [ 0.7 0.7 0.7 ]
  60.          Surface "crosstile"
  61.          TransformBegin
  62.             Scale 2 2.5 2
  63.             Patch "bilinear" "P"
  64.                [-0.5  0.5 0
  65.                  0.5  0.5 0
  66.                 -0.5 -0.5 0
  67.                  0.5 -0.5 0]  
  68.          TransformEnd
  69.       AttributeEnd
  70.    TransformEnd
  71.  
  72.    # The sphere with a wire framed surface
  73.    TransformBegin
  74.       Translate -.6 -.5 -2.0
  75.       Scale 2.5 2.5 1
  76.       Rotate 90 1 0 0
  77.       AttributeBegin
  78.          Color [ 1.0 0.5 0.5 ]
  79.          Surface "RCScreen"
  80.          Sphere 1 -1 1 360 
  81.       AttributeEnd
  82.    TransformEnd
  83.  
  84.  
  85. WorldEnd
  86.  
  87. FrameEnd
  88.